package Thread.GetName;
/*
*   线程名称：
*       主线程 main
*       新线程 Thread-0，Thread-1，Thread-2
*
* */
public class ThreadNametest01 {
    public static void main(String[] args) {

        //创建线程子类对象
        MyThread one = new MyThread();
        MyThread two = new MyThread();
        MyThread three = new MyThread();
        //调用start方法，开启新线程，执行run
        one.start();
        two.start();
        three.start();

        //获取主线程名称
        System.out.println(Thread.currentThread().getName());
    }
}